package dfbz.缓冲流;

import java.io.*;

public class demo01 {
    public static void main(String[] args) throws IOException {
        try ( BufferedInputStream bufferedInputStream = new BufferedInputStream(new FileInputStream(new File("E:\\东方标准\\JAVASE阶段\\JAVASE课件\\day20【TCP、UDP、通信】.pdf")));
              BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(new FileOutputStream(new File("E:\\东方标准\\JAVASE阶段\\JAVASE课件\\day20.pdf")))){
           int len;
           byte[] bytes=new byte[8192];
            while ((len=bufferedInputStream.read(bytes))!=-1){
                bufferedOutputStream.write(bytes,0,len);
            }
        }
    }
}
